/**
 * @file dvc_referee.h
 * @author yssickjgd (yssickjgd@mail.ustc.edu.cn)
 * @brief 裁判系统
 * @version 0.1
 * @date 2022-08-13
 *
 * @copyright USTC-RoboWalker (c) 2022
 *
 */

#ifndef DVC_REFEREE_H
#define DVC_REFEREE_H

/* Includes ------------------------------------------------------------------*/

#include <string.h>
#include "drv_uart.h"

/* Exported macros -----------------------------------------------------------*/

/* Exported types ------------------------------------------------------------*/

/**
 * @brief 帧头格式
 * 
 */
struct Struct_Frame_Header
{
    uint8_t SOF;
    uint16_t Data_Length;
    uint8_t Seq;
    uint8_t CRC8;
}__attribute__((packed));

enum Enum_Referee_Cmd_ID
{
    Referee_Cmd_ID_GAME_STATUS = 0x0001,
    Referee_Cmd_ID_GAME_RESULT,
    Referee_Cmd_ID_GAME_ROBOT_HP,
    Referee_Cmd_ID_DART_STATUS,
    Referee_Cmd_ID_ICRA_Buff_Debuff_Zone_Status,
    Referee_Cmd_ID_Event_Data = 0x0101,
    Referee_Cmd_ID_SUPPLY_PROJECTILE_ACTION,
    // Referee_Cmd_ID_REQUEST_SUPPLY,
    Referee_Cmd_ID_REFEREE_WARNING,
    Referee_Cmd_ID_DART_REMAINING_TIME,
    Referee_Cmd_ID_GAME_ROBOT_STATUS = 0x0201,
    Referee_Cmd_ID_POWER_HEAT_DATA,
    Referee_Cmd_ID_GAME_ROBOT_POS,
    Referee_Cmd_ID_BUFF,
    Referee_Cmd_ID_AERIAL_ROBOT_ENERGY,
    Referee_Cmd_ID_ROBOT_HURT,
    Referee_Cmd_ID_SHOOT_DATA,
    Referee_Cmd_ID_BULLET_REMAINING,
    Referee_Cmd_ID_RFID_STATUS,
    Referee_Cmd_ID_DART_CLIENT_CMD,
    Referee_Cmd_ID_STUDENT_INTERACTIVE_HEADER_DATA = 0x0301,
    Referee_Cmd_ID_CUSTOM_CONTROLLER_DATA,
    Referee_Cmd_ID_MINIMAP_INTERACTIVE_DATA,
    Referee_Cmd_ID_KEYBOART_MOUSE_DATA,
};

/* Exported variables --------------------------------------------------------*/

/* Exported function declarations --------------------------------------------*/

#endif

/************************ COPYRIGHT(C) USTC-ROBOWALKER **************************/
